import {createRouter, createWebHashHistory} from "vue-router"

const asyncRoutes = [
    {
        path: "/",
        name: "Home",
        icon: "HomeFilled",
        component: () => import("@/pages/Home.vue"),
        meta: {
            title: "首页"
        }
    },
    {
        path: '/EasyPoi',
        name: "EasyPoi",
        component: () => import("@/pages/EasyPoi.vue"),
        meta: {
            title: 'EasyPoi'
        },
    },
    {
        path: '/EasyExcel',
        name: "EasyExcel",
        component: () => import("@/pages/EasyExcel.vue"),
        meta: {
            title: 'EasyExcel'
        },
    }
]

const routes = [
    {
        path: '/',
        name: "Admin",
        component: () => import("@/layouts/Admin.vue"),
        children: asyncRoutes
    }
]

export const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export {asyncRoutes}